package com.gxa.user.recycling.controller;


import com.gxa.core.recycling.common.JsonResult;
import com.gxa.core.recycling.pojo.Banner;
import com.gxa.user.recycling.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author xhy
 */
@RestController
@RequestMapping("/banner")
@CrossOrigin
public class BannerController {

    @Autowired
    private BannerService service;

    @PostMapping("/selectAll")
    public Map selectAll(){

        List<Banner> all = service.findAllList();
        JsonResult jsonResult=new JsonResult();
        jsonResult.setCode("200");
        return jsonResult.getDataMap();
    }


}
